package prototypes;

import java.io.IOException;
import java.io.PrintStream;
import java.net.Socket;
import java.net.UnknownHostException;

/** A test client for the Prototype Server.
 * 
 * @author Matthew Johnstone <mjohnstone357@gmail.com>
 *
 */
public class DemoClient {
	
	public static void main(String[] args){
		
		Socket server = null;
		
		try {
			server = new Socket("localhost", 6890);
		} catch (UnknownHostException e) {
			e.printStackTrace();
			System.exit(1);
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(2);
		}
		
		
		PrintStream output = null;
		
		try {
			output = new PrintStream(server.getOutputStream());
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(3);
		}
		
		output.println("The quick brown fox\njumps over the lazy dog.");
		
	}

}
